﻿using System.Collections.Generic;
using Fetches.Fetch.Utils;

namespace Fetches.Fetch.Dto
{
    /// <summary>
    ///     回执,用户凭借回执向Factory申请消费PagePool或者获取执行状态
    /// </summary>
    public class FetchReceipt : IJsonWriteable
    {
        /// <summary>
        /// 对应FetchTask的Id
        /// </summary>
        public long Id { get; set; }
        public IList<long> FetcherIds { get; set; }

        public static FetchReceipt FromJsonFile(string filename)
        {
            return JsonFileHelper.FromFile<FetchReceipt>(filename);
        }
    }
}